import requests
import json

import cookies_pool

headers = {
    "authority": "weread.qq.com",
    "accept": "application/json, text/plain, */*",
    "accept-language": "zh-CN,zh;q=0.9",
    "cache-control": "no-cache",
    "content-type": "application/json;charset=UTF-8",
    "origin": "https://weread.qq.com",
    "pragma": "no-cache",
    "referer": "https://weread.qq.com/web/reader/85d32cd0813ab82e0g012433k861322a025a8613985ec87a",
    "sec-ch-ua": "\"Chromium\";v=\"116\", \"Not)A;Brand\";v=\"24\", \"Google Chrome\";v=\"116\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Linux\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-origin",
    "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
}
cookies = cookies_pool.cookies
url = "https://weread.qq.com/web/book/chapterInfos"
data = {
    "bookIds": [
        "3300072642"
    ]
}
data = json.dumps(data, separators=(',', ':'))
response = requests.post(url, headers=headers, cookies=cookies, data=data)

print(response.json())
print(response)